﻿@model JPSOFTWARE.BON.Modelos.UsuarioView
@{
    ViewBag.Title = "Bebida Social - Perfil";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<div class="span3">
</div>
<div class="span6 box">
    <div class="box-head">
        <h3>
            Perfil</h3>
    </div>
    <div class="box-content">
        <div class="content-inner">
            <div class="container">
                <div class="row">
                    <div class="span2">
                        <img class="img-rounded" src="@Url.Content("~/Content/bootstrap/img/profile.png")" alt="Perfil" />
                    </div>
                    <div class="span4">
                        <p class="fonteTituloPerfil">@Model.Nome</p>
                        <p>
                            <strong>E-mail: </strong>@Model.Email</p>
                        <p>
                            <strong>Tipo: </strong>@Model.TipoUsuario</p>
                        <p>
                            <strong>Status: </strong>@Model.Status</p>
                        <p>
                            <strong>Última Atualização: </strong>@Model.DataAlteracao</p>
                        @Html.ActionLink("Alterar senha", "AlterarSenha", "Login", new { Area = String.Empty }, new { @class = "btn btn-mini " })
                        @*@Html.ActionLink("Alterar dados", "", "", new { Area = String.Empty, @id = @Model.IdUsuario }, new { @class = "btn btn-mini " })
                                    @Html.ActionLink("Excluir conta", "", "", new { Area = String.Empty, @id = @Model.IdUsuario }, new { @class = "btn btn-mini btn-danger" })*@
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="span3">
</div>
@*
<div class="page-header">
    <h1>
        Lista de Usuário</h1>
</div>

<div class="webgrid">
        @{            
            var grid = new WebGrid(source: Model,
                defaultSort: "Title",
                rowsPerPage: 1,
                canPage: true,
                canSort: true,
                fieldNamePrefix: "gridItens_",
                pageFieldName: "usuario",
                selectionFieldName: "selectedRow"
                );
                }
            @grid.GetHtml(
            tableStyle: "webgrid",
            headerStyle: "webgrid-header",
            footerStyle: "webgrid-footer",
            alternatingRowStyle: "webgrid-alternating-row",
            rowStyle: "webgrid-row-style",
            selectedRowStyle: "webgrid-selected-row",
            caption: "Usuario do Sistema",
            mode: WebGridPagerModes.NextPrevious, previousText: "Anterior", nextText: "Próximo",
            
                //            @Html.ActionLink("Editar", "EditarUsuario", new { id = item.IdUsuario }, new { @class = "btn btn-warning" })
                //@Html.ActionLink("Excluir", "ExcluirUsuario", new { id = item.IdUsuario }, new { @class = "btn btn-danger" })

            
            columns: grid.Columns(
            grid.Column("Editar", header: "", format: @<i>@Html.ActionLink("Editar", "EditarUsuario", new { @class = "btn btn-warning" }, new { id = item.IdUsuario })</i>, style: "text-align-left"),
                              grid.Column("Excluir", header: "", format: @<b>@Html.ActionLink("Excluir", "ExcluirUsuario", new { id = item.IdUsuario, @class = "btn" })</b>, style: "text-align-left"),
                                                grid.Column(columnName: "Nome", header: "Usuário", style: "text-align-center"),        
                                                                                             grid.Column(columnName: "Email", header: "E-mail", style: "text-align-center"),
                                                                                                                        grid.Column(columnName: "TipoUsuario", header: "Tipo de suário", style: "text-align-center"),
                                                                                                                                                   grid.Column(columnName: "DataAlteracao", header: "Última Atualização", style: "text-align-center"),
                                                                                             grid.Column(columnName: "Status", header: "Status", style: "text-align-center")
                     )
                     ) 
            @Html.Label("Registros encontrados:") @grid.PageCount            

            @{
                JPSOFTWARE.BON.Modelos.UsuarioView usuarioView = new JPSOFTWARE.BON.Modelos.UsuarioView(); 
                                           
            if (grid.HasSelection)
            {
                usuarioView = (JPSOFTWARE.BON.Modelos.UsuarioView)grid.Rows[grid.SelectedIndex].Value;
            }
                }                                          
    </div>*@